package com.ifighter.service.cluster;

import java.sql.SQLException;

import android.database.Cursor;

public class Cluster {
	
	public static final String TABLE = "CLUSTER";

	private long idCluster;
	private String sType;
	private boolean selected = false;

	/**
	 * 
	 * @param cursor
	 * @throws SQLException
	 */
	public Cluster (Cursor cursor) throws SQLException{

		this.idCluster = cursor.getLong(cursor.getColumnIndex("ID_CLUSTER"));
		this.sType     = cursor.getString(cursor.getColumnIndex("TYPE")) != null ? cursor.getString(cursor.getColumnIndex("TYPE")) : "";
	}

	public long getIdCluster() {
		return idCluster;
	}

	public String getsType() {
		return sType;
	}

	public void setsType(String sType) {
		this.sType = sType;
	}	
	
	public boolean isSelected() {
		return selected;
	}

	public void setSelected(boolean selected) {
		this.selected = selected;
	}
}